//@author A0096440E
#include "stdafx.h"
#include "CppUnitTest.h"

using namespace Microsoft::VisualStudio::CppUnitTestFramework;

namespace TaskItUnitTest {
	TEST_CLASS(WholeSystemTest) {
	public:
		
		TEST_METHOD(WholeSystemTest1) {
			TaskItScheduler myScheduler;
			bool smallUI = true;
			vector <string> expected;
			vector <string> actual;
			expected.push_back((MESSAGE_ADDED + "\r\n\r\n     Activity: Dances\r\n      Venue: Studio\r\nTime Start: 09:00\r\n Time End: 10:00\r\n  Category: Recreation\r\n        Date: 140314\r\n      Status: Not Done\r\n\r\nNote: Date specified has already passed."));

			actual = myScheduler.executeCommand("add [Dances][Studio][0900][1000][Recreation][140314]", smallUI);
			Assert::IsTrue(smallUI);

			int size = actual.size();
			for (int i = 0; i < size; i++) {
				Assert::AreEqual(actual[i], expected[i]);
			}

			smallUI = true;
			expected.clear();
			actual.clear();

			actual = myScheduler.executeCommand("add [Dances][Studio][0900][1000][Recreation][140314]", smallUI);
			expected.push_back((MESSAGE_ADDED + "\r\n\r\n     Activity: Dancing\r\n      Venue: Studio\r\nTime Start: 09:00\r\n Time End: 10:00\r\n  Category: Recreation\r\n        Date: 150314\r\n      Status: Not Done\r\n\r\nNote: Date specified has already passed."));

			actual = myScheduler.executeCommand("add [Dancing][Studio][0900][1000][Recreation][150314]", smallUI);
			Assert::IsTrue(smallUI);


			size = actual.size();
			for (int i = 0; i < size; i++) {
				Assert::AreEqual(actual[i], expected[i]);
			}
		}

	};
}